import request from '@/utils/request'

// 获取商品列表
export function getProductList(params) {
    return request({
        url: '/api/cms/content/shop/list',
        method: 'get',
        params: params
    })
}

// 获取商品详情
export function getProductDetail(id) {
    return request({
        url: `/products/${id}`,
        method: 'get'
    })
}

// 兑换商品
export function exchangeProduct(id) {
    return request({
        url: `/products/${id}/exchange`,
        method: 'post'
    })
}

